CFLAGS =  -Wall -fpic -coverage -lm -std=c99

default: unittestresultsCL.out

unittestresultsCL.out: unittest1.c unittest2.c unittest3.c unittest4.c dominion.c rngs.c

	 echo "Erik Lawing CS362 Teammate Chris Lewis Tests:" > unittestresultsCL.out
	 echo " " >> unittestresultsCL.out
	 echo "Result for running updateCoins tests:" >> unittestresultsCL.out
	 echo "unittest1.c:" >> unittestresultsCL.out
	 gcc -o unittest1 dominion.c unittest1.c rngs.c $(CFLAGS)
	 ./unittest1 >> unittestresultsCL.out
		
	 echo " " >>unittestresultsCL.out
	 echo "Result for running isGameOver tests:" >> unittestresultsCL.out
	 echo "unittest2.c:" >> unittestresultsCL.out
	 gcc -o unittest2 dominion.c unittest2.c rngs.c $(CFLAGS)
	 ./unittest2 >> unittestresultsCL.out
		
	 echo " " >> unittestresultsCL.out
	 echo "Result for running scoreFor tests:" >> unittestresultsCL.out
	 echo "unittest3.c:" >> unittestresultsCL.out
	 gcc -o unittest3 dominion.c unittest3.c rngs.c $(CFLAGS)
	 ./unittest3 >> unittestresultsCL.out
		
	 echo " " >> unittestresultsCL.out
	 echo "Result for running getWinners tests:" >> unittestresultsCL.out
	 echo "unittest4.c:" >> unittestresultsCL.out
	 gcc -o unittest4 dominion.c unittest4.c rngs.c $(CFLAGS)
	 ./unittest4 >> unittestresultsCL.out	
	 
	 echo " " >> unittestresultsCL.out
	 echo "Result for running Steward tests:" >> unittestresultsCL.out
	 echo "cardtest1CL.c:" >> unittestresultsCL.out
	 gcc -o cardtest1CL dominion.c cardtest1CL.c rngs.c $(CFLAGS)
	 ./cardtest1CL >> unittestresultsCL.out
	 
	 echo " " >> unittestresultsCL.out
	 echo "Result for running Council Room tests:" >> unittestresultsCL.out
	 echo "cardtest2CL.c:" >> unittestresultsCL.out
	 gcc -o cardtest2CL dominion.c cardtest2CL.c rngs.c $(CFLAGS)
	 ./cardtest2CL >> unittestresultsCL.out	 
		 
	 echo " " >> unittestresultsCL.out
	 echo "Result for running minionCard tests:" >> unittestresultsCL.out
	 echo "cardtest5CL.c:" >> unittestresultsCL.out
	 gcc -o cardtest5CL dominion.c cardtest5CL.c rngs.c $(CFLAGS)
	 ./cardtest5CL >> unittestresultsCL.out
		
			
clean:
	rm unittestresultsCL.out

cleanall: 
	rm unittestresultsCL.out unittest1 unittest2 unittest3 unittest4 *.gcda *.gcno *.gcov
